//
//  ModuleFirst_TravelsDetailsBigModel.m
//  艾听歌
//
//  Created by dllo on 16/5/28.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ModuleFirst_TravelsDetailsBigModel.h"
#import "ModuleFirst_TravelsDetailsDayModel.h"

@implementation ModuleFirst_TravelsDetailsBigModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key{
    
    if ([key isEqualToString:@"id"]) {
        
        self.idd = value;
    }
    
}



//重写setter方法
- (void)setUser:(NSDictionary *)user{
    
    _user = user;
    ModuleFirst_UserInformationModel *model = [[ModuleFirst_UserInformationModel alloc]init];
    model.idd = [_user objectForKey:@"id"];
    model.name = [_user objectForKey:@"name"];
    model.image = [_user objectForKey:@"image"];
    
    self.userModel = model;
    
}


- (void)setTrip_days:(NSMutableArray *)trip_days{
    
    _trip_days = trip_days;
    
    NSMutableArray *array1 = [[NSMutableArray alloc]init];
    
    for (NSDictionary *dic in trip_days) {
        
        ModuleFirst_TravelsDetailsDayModel *model = [[ModuleFirst_TravelsDetailsDayModel alloc]init];
        [model setValuesForKeysWithDictionary:dic];
        
        [array1 addObject:model];
    }

    _trip_days = [NSMutableArray arrayWithArray:array1];
}

@end
